<?php
/**
 * <i>indent</i>定义
 * 
 * @version $Id: IMintIndentModifier.php 312 2008-04-23 16:29:38Z iwind $
 * @package util.mint.modifier
 * @since 0.0.2
 */
class IMintIndentModifier extends IAbstractMintModifier {
	/**
	 * 构造器
	 *
	 */	
	public function __construct() {
		
	}
	
	/**
	 * 执行
	 *
	 * @return scalar
	 */	
	public function execute(/** $number, $char **/) {
		$string = $this->getVariable();
		$arguments = $this->getArguments();
		$chars = isset($arguments[0])?intval($arguments[0]):4;
		$char = isset($arguments[1])?$arguments[1]:" ";
    	return preg_replace('!^!m',str_repeat($char,$chars),$string);
	}
}


?>